using System;
using System.IO;
using System.Management;
using System.Windows.Forms;
public static class ProcessorUtil
{
	public static bool smethod_0(string string_0)
	{
		string text = ProcessorUtil.smethod_3() + ProcessorUtil.smethod_4();
		CryptUtil.encrypt(text);
		if (!File.Exists(string_0 + "/支付宝采集.key"))
		{
			Clipboard.SetDataObject(text);
			new Form2
			{
				textBoxMashine = 
				{
					Text = text
				},
				textBoxKey = 
				{
					Text = "没有KEY文件！"
				}
			}.ShowDialog();
			return false;
		}
		string text2 = new StreamReader(string_0 + "/支付宝采集.key").ReadToEnd();
		string text3 = CryptUtil.decrypt(text2);
		if (!text3.Equals(text))
		{
			Clipboard.SetDataObject(text);
			new Form2
			{
				textBoxMashine = 
				{
					Text = text
				},
				textBoxKey = 
				{
					Text = string.Concat(new string[]
					{
						text,
						"***",
						text2,
						"***",
						text3
					})
				}
			}.ShowDialog();
			return false;
		}
		return true;
	}
	public static string smethod_1()
	{
		return ProcessorUtil.smethod_3() + ProcessorUtil.smethod_4();
	}
	public static string smethod_2()
	{
		string result;
		try
		{
			ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("Select * From Win32_Processor");
			string text = "";
			using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = managementObjectSearcher.Get().GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					ManagementObject managementObject = (ManagementObject)enumerator.Current;
					text = managementObject["ProcessorId"].ToString().Trim();
				}
			}
			result = text;
		}
		catch
		{
			result = "";
		}
		return result;
	}
	public static string smethod_3()
	{
		string result;
		try
		{
			string text = "";
			ManagementClass managementClass = new ManagementClass("Win32_Processor");
			using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = managementClass.GetInstances().GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					ManagementObject managementObject = (ManagementObject)enumerator.Current;
					text = managementObject.Properties["ProcessorId"].Value.ToString();
				}
			}
			result = text.ToString();
		}
		catch
		{
			result = "";
		}
		return result;
	}
	public static string smethod_4()
	{
		string result;
		try
		{
			string text = "";
			ManagementClass managementClass = new ManagementClass("Win32_NetworkAdapterConfiguration");
			using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = managementClass.GetInstances().GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					ManagementObject managementObject = (ManagementObject)enumerator.Current;
					if ((bool)managementObject["IPEnabled"])
					{
						text = managementObject["MacAddress"].ToString();
					}
					managementObject.Dispose();
				}
			}
			result = text;
		}
		catch
		{
			result = "";
		}
		return result;
	}
}
